﻿using System;
using System.Collections.Generic;
using System.Text;

namespace GitUtil
{
    /// <summary>
    /// POM模块信息
    /// </summary>
    public class ModuleInfo
    {
        private static List<String> moduleNames = new List<String>();

        public String name; // 模块名称
        public String path; // 模块路径
        public OutType outType; // 输出打包类型
        public List<ModuleInfo> childModules; // 子模块

        public List<String> classFilePath; // class文件路径
        public List<String> resouresPath; // 静态资源文件路径

        public void AddChidMoudle(ModuleInfo moduleInfo)
        {
            if (childModules == null) {
                childModules = new List<ModuleInfo>();
            }
            childModules.Add(moduleInfo);
        }

        public Boolean IsFileBelong(String filePath) {
            Boolean belongFlag = false;

            return belongFlag;
        }

        public static void AddModuleName(String moduleName) {
            moduleNames.Add(moduleName);
        }

        public void AddClassFile(String classFile)
        {
            if(classFilePath == null)
            {
                classFilePath = new List<String>();
            }
            classFilePath.Add(classFile);
        }

        public void AddResourcesFilePath(String resourcess)
        {
            if(resouresPath == null)
            {
                resouresPath = new List<String>();
            }
            resouresPath.Add(resourcess);
        }
    }
}
